# -*- coding: utf-8 -*-
# @Time:    2023-05-30 11:13
# @Author:  geng
# @Email:   yonglonggeng@163.com
# @WeChat:  superior_god
# @File:    count.py
# @Project: tag2label
# @Package: 
# @Ref:
import os

file_list = os.listdir("datasets/images/normal")

count_json = 0
count_jpg = 0

json_file = []
jpg_file = []
for file in file_list:
    if file.split(".")[-1] == "json":
        count_json += 1
        json_file.append(file.split(".")[0])
    elif file.split(".")[-1] == "jpg":
        count_jpg += 1
        jpg_file.append(file.split(".")[0])
    else:
        print(file)

print(len(jpg_file), len(json_file))
res = set(jpg_file).intersection(json_file)
print(len(res))
